package com.shop.util;

import com.mongodb.MongoClient;
import com.mongodb.client.MongoDatabase;

public class MongoDBUtil {
    private static final String HOST = "localhost";
    private static final int PORT = 27017;
    private static final String DATABASE = "shopdb";
    
    private static MongoClient mongoClient;
    
    static {
        mongoClient = new MongoClient(HOST, PORT);
    }
    
    public static MongoDatabase getDatabase() {
        return mongoClient.getDatabase(DATABASE);
    }
} 